home *** CD-ROM | disk | FTP | other *** search
/ Java for 3D & VRML Worlds / Java for 3d and VRML Worlds.iso / doc / homepage / tutorials / lesson7 / shareeg2 / moveball.wrl < prev    next >
Text File  |  1996-08-22  |  886b  |  44 lines

  1. #VRML Draft #3 V2.0 utf8
  2.  
  3. PROTO Sony_BindSharedNode [ field SFNode transformNode NULL
  4.                 field SFNode scriptNode NULL ] {}
  5.  
  6. WorldInfo { title "try"
  7.         info ["VsServer:spiw.com:7004"] }
  8.  
  9. DEF OBJ1 Transform {
  10.     translation 0 0 0
  11.     children [
  12.         DEF HITME TouchSensor {}
  13.         Shape {
  14.                 geometry Sphere {}
  15.               }
  16.        ]
  17. }
  18.  
  19. DEF ScriptObj1 Script {
  20.     field SFNode obj1 USE OBJ1
  21.     eventIn SFTime move
  22.         eventIn SFString rpc_place_ball
  23.     eventOut SFVec3f obj1position
  24.     eventOut SFBool timerEnable
  25.         url "moveball.class"
  26. }
  27.  
  28. DEF CLOCK TimeSensor {
  29.   loop TRUE
  30.   enabled TRUE 
  31.   cycleInterval 0.2
  32.   stopTime -1
  33. }    
  34.     
  35. ROUTE ScriptObj1.obj1position TO OBJ1.set_translation
  36. ROUTE ScriptObj1.timerEnable TO CLOCK.set_enabled
  37. ROUTE CLOCK.cycleTime TO ScriptObj1.move
  38.  
  39. Sony_BindSharedNode {
  40.     transformNode USE OBJ1
  41.     scriptNode USE ScriptObj1
  42. }
  43.  
  44.